package io.renren.modules.sys.service;

import io.renren.modules.sys.entity.SysBottomEntity;
import io.renren.modules.sys.entity.SysBottomTotalEntity;
import io.renren.modules.sys.entity.SysBottomUserEntity;
import io.renren.modules.sys.entity.SysOddsCatetoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 用户投注表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-11-08 19:36:41
 */
public interface SysBottomUserService {
	
	SysBottomUserEntity queryObject(Long bottomId);
	
	List<SysBottomUserEntity> queryList(Map<String, Object> map);
	
	int queryTotal(Map<String, Object> map);
	
	void save(SysBottomUserEntity sysBottomUser);
	
	void update(SysBottomUserEntity sysBottomUser);
	
	void delete(Long bottomId);
	
	void deleteBatch(Long[] bottomIds);

	/**
	 * 用户下注
	 * @param bottomList 下注列表
	 * @param sysBottomEntity 期数
	 */
	void bottom(List<SysOddsCatetoryEntity> bottomList, SysBottomEntity sysBottomEntity);

	/**
	 * 开奖
	 * @param sysBottomEntity 开奖信息
	 */
	void lottery(SysBottomEntity sysBottomEntity);

	/**
	 * 根据条件查询下注金额与获奖金额统计
	 * @param param
	 * @return
	 */
	SysBottomUserEntity querAmountTotal(Map<String, Object> param);

	/**
	 * 按日期查询每日统计
	 * @param param
	 * @return
	 */
	List<SysBottomTotalEntity> querySumList(Map<String, Object> param);
}
